package com.nuoniu.sibanyun.entity.po;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 请购单主表
 * </p>
 *
 * @author baiqiang
 * @since 2020-11-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("scp_requisition")
@ApiModel(value="VRoRequisitionOrderMain对象", description="请购单主表")
public class VRoRequisitionOrderMain extends BaseEntity {

    private static final long serialVersionUID = 1L;



    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "单据编号")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate voucherDate;

    @ApiModelProperty(value = "请购人id")
    @TableField("requisition_user_id")
    private Integer requisitionUserId;

    @ApiModelProperty(value = "请购人")
    @TableField("requisition_user_name")
    private String requisitionUserName;

    @ApiModelProperty(value = "需求日期")
    @TableField("require_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate requireDate;


    @ApiModelProperty(value = "业务类型")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty(value = "采购类型ID")
    @TableField("purchase_type_id")
    private Integer purchaseTypeId;

    @ApiModelProperty(value = "采购类型名称")
    @TableField("purchase_type_name")
    private String purchaseTypeName;

    @ApiModelProperty(value = "采购类型编码")
    @TableField("purchase_type_code")
    private String purchaseTypeCode;

    @ApiModelProperty(value = "收发类别ID")
    @TableField("rd_style_id")
    private Integer rdStyleId;

    @ApiModelProperty(value = "收发类别")
    @TableField("rd_style_name")
    private String rdStyleName;

    @ApiModelProperty(value = "收发类别编码")
    @TableField("rd_style_code")
    private String rdStyleCode;


    @ApiModelProperty(value = "项目id")
    @TableField("project_id")
    private Integer projectId;

    @ApiModelProperty(value = "项目名称")
    @TableField("project_name")
    private String projectName;

    @ApiModelProperty(value = "项目编码")
    @TableField("project_code")
    private String projectCode;

    @ApiModelProperty(value = "部门id")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "部门名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "供应商id")
    @TableField("vendor_id")
    private Integer vendorId;

    @ApiModelProperty(value = "供应商名称")
    @TableField("vendor_name")
    private String vendorName;

    @ApiModelProperty(value = "供应商简称")
    @TableField("vendor_simple_name")
    private String vendorSimpleName;

    @ApiModelProperty(value = "金额")
    @TableField("total_amount")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "税额")
    @TableField("total_tax_amount")
    private BigDecimal totalTaxAmount;

    @ApiModelProperty(value = "含税金额")
    @TableField("total_include_tax_amount")
    private BigDecimal totalIncludeTaxAmount;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源日期")
    @TableField("source_voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "到货地址")
    @TableField("accept_address")
    private String acceptAddress;

    @ApiModelProperty(value = "单据状态")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "生单状态")
    @TableField("release_state")
    private Integer releaseState;

    @ApiModelProperty(value = "审核人id")
    @TableField("reviewer_user_id")
    private Integer reviewerUserId;

    @ApiModelProperty(value = "审核人姓名")
    @TableField("reviewer_user_name")
    private String reviewerUserName;

    @ApiModelProperty(value = "审核日期")
    @TableField("reviewer_date")
    private LocalDateTime reviewerDate;

    @ApiModelProperty(value = "批准人id")
    @TableField("approval_user_id")
    private Integer approvalUserId;

    @ApiModelProperty(value = "批准人姓名")
    @TableField("approval_user_name")
    private String approvalUserName;

    @ApiModelProperty(value = "批准日期")
    @TableField("approval_date")
    private LocalDateTime approvalDate;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人姓名")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "关闭人id")
    @TableField("closed_user_id")
    private Integer closedUserId;

    @ApiModelProperty(value = "关闭人姓名")
    @TableField("closed_user_name")
    private String closedUserName;

    @ApiModelProperty(value = "关闭人日期")
    @TableField("closed_date")
    private LocalDateTime closedDate;

    @ApiModelProperty(value = "提交人ID")
    @TableField("submit_user_id")
    private Integer submitUserId;

    @ApiModelProperty(value = "提交人姓名")
    @TableField("submit_user_name")
    private String submitUserName;

    @ApiModelProperty(value = "提交时间")
    @TableField("submit_date")
    private LocalDateTime submitDate;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;



    @ApiModelProperty(value = "总数量")
    @TableField("total_quantity")
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "累计执行数量")
    @TableField("cum_execute_quantity")
    private BigDecimal cumExecuteQuantity;


    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "请购单明细")
    @TableField(exist = false)
    private List<VRoRequisitionOrderDetail> orderDetailList;

}
